import DataSelect, { DataSelectProps } from '@/components/DataSelect';
import React from 'react';
import * as api from './api';

/**
 * 通用城市选择
 * @param props
 * @returns
 */
export default function CitySelect({labelField, valueField, onFetch, ...props}: DataSelectProps) {
  return (
    <DataSelect
      onFetch={(_) => api.getCities()}
      labelField={labelField || 'name'}
      valueField={valueField || 'itemId'}
      {...props}
    />
  )
}
